.data
    letter:     .asciz  "The character is a lowercase letter."
    digit:      .asciz  "The character is a digit."
    other:      .asciz  "The character is not a digit or a lowercase letter."

.text

    .extern getchar
    .extern puts
    .global main
    
    main:

        BL      getchar
        BL      judge_lowercase_letter_left

    judge_lowercase_letter_left:
        CMP     W0, #97
        BCS     judge_lowercase_letter_right
        BL      judge_digit_right
    judge_lowercase_letter_right:   
        CMP     W0, #122
        BLS     is_lowercase_letter
        BL      judge_digit_right    
    is_lowercase_letter:
        LDR     W0, =letter
        BL      puts
        B       complete

    judge_digit_left:
        CMP     W0, #48
        BCS     judge_digit_right
        B       is_other
    judge_digit_right:   
        CMP     W0, #57
        BLS     is_digit
        B       is_other    
    is_digit:
        LDR     W0, =digit
        BL      puts
        B       complete

    is_other:
        LDR     W0, =other
        BL      puts
        B       complete

    complete:




